package com.奇数偶数结点链表交换;

public class Test {

	public static void main(String[] args) {
		ListNode head=new ListNode(1);
		ListNode p=head;
		for(int i=2;i<=4;i++) {
			ListNode a = new ListNode(i);
			p.next=a;
			p=p.next;
		}
		Solution s  = new Solution();
		head=s.oddEvenList(head);
		while(head!=null) {
			System.out.println(head.val);
			head=head.next;
		}
	}

}
